package com.qk.management.controller;

import com.qk.common.Result;
import com.qk.entity.Activity;
import com.qk.management.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *
 * @author MrZhao
 * @created 2025-10-14 16:29
 * @description
 *
 */
@RestController
@RequestMapping("/activities")
public class ActivityController {

    @Autowired
    private ActivityService activityService;

    @GetMapping("/type/{type}")
    public Result getActivityByType(@PathVariable String type) {
        List<Activity> list = activityService.getActivityByType(type);
        return Result.success(list);
    }

}
